import 'package:flutter/material.dart';

/**
 * Container布局
 */
class ContainerWidget extends StatelessWidget {
  const ContainerWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Color(0XFFFF0000),
        title: Text('这是一个标题'),
      ),
      body: Container(
        ///上下左右设置
        // alignment: Alignment.centerRight,
        // alignment: Alignment(-1, -1),///左上
        // alignment: Alignment(1, 0.5),

        ///文案距离上下左右都是10
        // padding: EdgeInsets.all(10),
        ///距离顶部10
        // padding: EdgeInsets.only(right: 10),
        padding: EdgeInsets.symmetric(vertical: 90,horizontal: 70),

        ///默认跟着里面的字体大小
        color: Colors.green,
        child: Text('Container'),
        width: 200,
        height: 200,
      ),
    );
  }
}
